package com.liferay;

import javax.portlet.Event;
import javax.portlet.EventRequest;
import javax.portlet.EventResponse;
import javax.portlet.ProcessEvent;
 
import com.liferay.util.bridges.mvc.MVCPortlet;
 
/**
 *
 * @author Hamidul Islam
 *
 */
public class EventRecieverPortlet extends MVCPortlet {
 
    @ProcessEvent(qname = "{http://liferay.com/events}ipc-text")
    public void myEvent(EventRequest request, EventResponse response) {
        Event event = request.getEvent();
        //Get data from the event
        String sampleText = (String) event.getValue();
        //Set the text in response to display in UI
        response.setRenderParameter("sampleText", sampleText);
    }
 
}